using System;

namespace NGIS.Model
{
	public struct SpatiotemporalStepLength
	{
		public double Min;

		public double Max;

		public string Unit;

		public SpatiotemporalStepLength(double min, double max, string unit)
		{
			Min = min;
			Max = max;
			Unit = unit;
		}

		public SpatiotemporalStepLength(string step, string unit)
		{
			if (step.Trim() == "")
			{
				Min = 0.0;
				Max = 0.0;
			}
			else
			{
				string text = step.Substring(1, step.Length - 2);
				string[] array = text.Split(',');
				Min = Convert.ToDouble(array[0]);
				Max = Convert.ToDouble(array[1]);
			}
			Unit = unit;
		}

		public static bool operator ==(SpatiotemporalStepLength sslA, SpatiotemporalStepLength sslB)
		{
			if (sslA.Min == sslB.Min && sslA.Max == sslB.Max && sslA.Unit == sslB.Unit)
			{
				return true;
			}
			return false;
		}

		public static bool operator !=(SpatiotemporalStepLength sslA, SpatiotemporalStepLength sslB)
		{
			return !(sslA == sslB);
		}
	}
}
